<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<script language="JavaScript">
    function validate_form(){
        if ( document.QuizForm.judul.value == "" ){
            alert ( "<bean:message key="quiz.judul"/> "+isEmpty);
        }else{
            document.QuizForm.submit();
        }
    }

    function validate_form_soal_and_jawaban(){
        if ( document.QuizForm.pertanyaan.value == "" ){
            alert ( "<bean:message key="quiz.pertanyaan"/> "+isEmpty);
        }else if ( document.QuizForm.jawaban.value == "" ){
            alert ( "<bean:message key="quiz.jawaban"/> "+isEmpty);
        }else if ( document.QuizForm.nilai.value == "" ){
            alert ( "<bean:message key="quiz.nilai"/> "+isEmpty);
        }else{
            document.QuizForm.submit();
        }
    }

    function validate_form_soal1(){
        if ( document.QuizForm.pertanyaan.value == "" ){
            alert ( "<bean:message key="quiz.pertanyaan"/> "+isEmpty);
        }else{
            document.QuizForm.submit();
        }
    }

    function validate_form_soal(){
        if ( document.QuizForm.pertanyaan.value == "" ){
            alert ( "<bean:message key="quiz.pertanyaan"/> "+isEmpty);
        }else if ( document.QuizForm.jawabanA.value == "" ){
            alert ( "<bean:message key="quiz.jawabanA"/> "+isEmpty);
        }else if ( document.QuizForm.jawabanB.value == "" ){
            alert ( "<bean:message key="quiz.jawabanB"/> "+isEmpty);
        }else if ( document.QuizForm.jawabanC.value == "" ){
            alert ( "<bean:message key="quiz.jawabanC"/> "+isEmpty);
        }else if ( document.QuizForm.jawabanD.value == "" ){
            alert ( "<bean:message key="quiz.jawabanD"/> "+isEmpty);
        }else if ( document.QuizForm.jawabanE.value == "" ){
            alert ( "<bean:message key="quiz.jawabanE"/> "+isEmpty);
        }else if ( document.QuizForm.nilaiA.value == "" ){
            alert ( "<bean:message key="quiz.nilaiA"/> "+isEmpty);
        }else if ( document.QuizForm.nilaiB.value == "" ){
            alert ( "<bean:message key="quiz.nilaiB"/> "+isEmpty);
        }else if ( document.QuizForm.nilaiC.value == "" ){
            alert ( "<bean:message key="quiz.nilaiC"/> "+isEmpty);
        }else if ( document.QuizForm.nilaiD.value == "" ){
            alert ( "<bean:message key="quiz.nilaiD"/> "+isEmpty);
        }else if ( document.QuizForm.nilaiE.value == "" ){
            alert ( "<bean:message key="quiz.nilaiE"/> "+isEmpty);
        }else{
            document.QuizForm.submit();
        }
    }

    function validate_form_Count(){
        if ( document.QuizForm.count.value == "" ){
            alert ( "<bean:message key="quiz.count"/> "+isEmpty);
        }else{
            document.QuizForm.submit();
        }
    }
</script>


